﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Group_Project_Book_Store
{
    /// <summary>
    /// Author of the book, a book has one author
    /// </summary>
    class clsAuthors
    {
        /// <summary>
        /// Author has a unique ID in the system
        /// </summary>
        public int authorID { get; set; }
        /// <summary>
        /// First Name of the author
        /// </summary>
        public string authorFirstName { get; set; }
        /// <summary>
        /// Last Name of the author
        /// </summary>
        public string authorLastName { get; set; }
        /// <summary>
        /// over ride method for author First and Last Name
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            try
            {
                return authorLastName + ", " + authorFirstName;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return null;
            }
        }
    }
}
